package com.xuetang9.t9.xinhuaxia.mappers;

import com.xuetang9.t9.xinhuaxia.beans.ReceiveAddress;
import com.xuetang9.t9.xinhuaxia.beans.UserOrderlist;
import org.apache.ibatis.annotations.*;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ReceiveAddressMapper extends Mapper<ReceiveAddress> {

    @Select("select * from receive_address where ra_userId = #{id}")
    @Results(id="receiveAddress",value = {
            @Result(property = "raAddressid",column = "ra_addressId"),
            @Result(property = "raUserid",column = "ra_userId"),
            @Result(property = "raProvince",column = "ra_province"),
            @Result(property = "raCity",column = "ra_city"),
            @Result(property = "raDetailedaddress",column = "ra_detailedAddress"),
            @Result(property = "raRecipient",column = "ra_recipient"),
            @Result(property = "raPhone",column = "ra_phone"),
            @Result(property = "raDefaultstatus",column = "ra_defaultStatus"),
    })
    List<ReceiveAddress> queryByUserId(@Param("id") Long id);


}